#version 300 es
uniform mat4 uMVPMatrix ;

uniform float angleSpan;
uniform float yStart;
uniform float ySpan;

in vec3 aPosition;
in vec2 aTexCoors;
out vec2 vTextureCoord;
void main(){
    float tempAS= angleSpan*(aPosition.y-yStart)/ySpan;
    vec3 tPosition=aPosition;
    if(aPosition.y>yStart)
       {
         tPosition.x=(cos(tempAS)*aPosition.x-sin(tempAS)*aPosition.z);
         tPosition.z=(sin(tempAS)*aPosition.x+cos(tempAS)*aPosition.z);
       }
       gl_Position = uMVPMatrix * vec4(tPosition,1);

       vTextureCoord = aTexCoors;

}